import Cookies from 'vue-cookies'
const tagsView = {
    state:{
        tagsView:Cookies.get("tagsView") ? eval(Cookies.get("tagsView")) : [],
    },
    mutations:{
        setTagsView(state,data){
            state.tagsView = data
            Cookies.set("tagsView",data)
        },
        addTagsView(state,data){
            console.log(state)
            state.tagsView.push(data)
            Cookies.set("tagsView",JSON.stringify(state.tagsView))
        },
        removeTagsView(state,data){
            state.tagsView.splice(data,1)
            Cookies.set("tagsView",JSON.stringify(state.tagsView))
        }

    },
    getters:{},
    actions:{},
    modules: {}
}
export default tagsView
